<!--<footer class="footer">
				<span class="footer-brand">
					<strong class="text-danger">Simplify</strong> Admin
				</span>
    <p class="no-margin">
        &copy; 2014 <strong>Simplify Admin</strong>. ALL Rights Reserved.
    </p>
</footer>-->
</div><!-- /wrapper -->

<!--<a href="#" class="scroll-to-top hidden-print"><i class="fa fa-chevron-up fa-lg"></i></a>-->


<button id="hidden_button" class="btn btn-danger btn-sm hide" data-toggle="modal" data-target="#updatePsw">修改</button>


<div class="modal fade bs-example-modal-sm delete" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="gridSystemModalLabel">删除框</h4>
            </div>
            <div class="modal-body">
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-md-1 custom-popup delete-widget-popup delete-confirmation-popup"
                             style="margin-left:-5%;margin-top:-5%;">
                            <div class="popup-header text-center">
                            <span class="fa-stack fa-4x">
                              <i class="fa fa-circle fa-stack-2x"></i>
                              <i class="fa fa-trash-o fa-stack-1x fa-inverse"></i>
                            </span>
                            </div>
                        </div>
                        <div class="col-md-9"></div>
                        <div class="col-md-offset-3 col-md-6">
                            确定删除吗？
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">取消</button>
                <a href="#" class="btn btn-primary btn-sm modalA">确定</a>
            </div>
        </div><!-- /.modal-content -->

    </div>
</div>


<div class="modal fade" id="updatePsw" tabindex="-1" role="dialog" aria-labelledby="updatePsw">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="exampleModalLabel">更改密码</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" id="form_li" action="<?php echo site_url("Backend/updateOldPassword");?>" method="post">
                    <div class="form-group">
                        <label for="message-text" class="col-sm-3 control-label">原始密码：</label>
                        <div class="col-sm-6">
                            <input type="password" class="form-control input-sm" id="message-text" name="oldPsw" >
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="message-text" class="col-sm-3 control-label">新密码：</label>
                        <div class="col-sm-6">
                            <input type="password" class="form-control input-sm" id="message-text" name="newPsw">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="message-text" class="col-sm-3 control-label"  >确认密码：</label>
                        <div class="col-sm-6">
                            <input type="password" class="form-control input-sm" id="message-text" name="confinePsw">
                        </div>
                    </div>
                    <div class="form-group">
                        <label  class="col-sm-3 control-label"  ></label>
                        <label  class="col-sm-3 control-label" style="color:red;" id="pwd_error" ></label>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary btn-sm" id="sub_pwd" name="submit">确认</button>
            </div>
        </div>
    </div>
</div>
<!-- Delete Widget Confirmation -->

<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->


<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->

<!-- Jquery -->
<script src="<?php echo base_url(); ?>style/js/jquery-1.11.1.min.js"></script>

<!-- Bootstrap -->
<script src="<?php echo base_url(); ?>style/js/bootstrap.min.js"></script>

<!-- Flot -->
<script src='<?php echo base_url(); ?>style/js/jquery.flot.min.js'></script>

<!-- Slimscroll -->
<script src='<?php echo base_url(); ?>style/js/jquery.slimscroll.min.js'></script>

<!-- Morris -->
<script src='<?php echo base_url(); ?>style/js/rapheal.min.js'></script>
<script src='<?php echo base_url(); ?>style/js/morris.min.js'></script>

<!-- Datepicker -->
<script src='<?php echo base_url(); ?>style/js/uncompressed/datepicker.js'></script>

<!-- Sparkline -->
<script src='<?php echo base_url(); ?>style/js/sparkline.min.js'></script>

<!-- Skycons -->
<script src='<?php echo base_url(); ?>style/js/uncompressed/skycons.js'></script>

<!-- Popup Overlay -->
<script src='<?php echo base_url(); ?>style/js/jquery.popupoverlay.min.js'></script>

<!-- Easy Pie Chart -->
<script src='<?php echo base_url(); ?>style/js/jquery.easypiechart.min.js'></script>

<!-- Sortable -->
<script src='<?php echo base_url(); ?>style/js/uncompressed/jquery.sortable.js'></script>

<!-- Owl Carousel -->
<script src='<?php echo base_url(); ?>style/js/owl.carousel.min.js'></script>

<!-- Modernizr -->
<script src='<?php echo base_url(); ?>style/js/modernizr.min.js'></script>

<!-- Simplify -->
<script src="<?php echo base_url(); ?>style/js/simplify/simplify.js"></script>
<script src="<?php echo base_url(); ?>style/js/simplify/simplify_dashboard.js"></script>

<script type="text/javascript" src="<?php echo base_url(); ?>ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>ueditor/ueditor.all.min.js"></script>
<script src="<?php echo base_url(); ?>style/js/bootstrap-datetimepicker.js" charset="UTF-8"></script>
<script src="<?php echo base_url(); ?>style/js/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script src="<?php echo base_url(); ?>style/js/my.js"></script>
<script>
    var date = new Date().Format("yyyy-MM-dd");
    $('#calendar').DatePicker({
        flat: true,
        date: date,
        current: date,
        calendars: 1,
        starts: 1
    });
    var ue = UE.getEditor('editor');
    $("#tbody .deleteButton").on("click", function () {
        var url = $(this).parents(".trForUrl").find("input").val();
        //var url = $(".trForUrl").find("input").val();
        //alert(url);
        $(".modalA").attr("href", url);
    })
    $(".uptop label").on("click", function () {
        $(this).css({"background": "#1993E2", "color": "white"}).siblings("label").css({
            "background": "#C8E8FC",
            "color": "black"
        });
    })
    $(".uptop input:checked").parents("label").css({
        "background": "#1993E2",
        "color": "white"
    }).siblings("label").css({"background": "#C8E8FC", "color": "black"});

    //密码修改
    $("#hidden_button2").on('click',function(){

        $("#hidden_button").trigger('click');

    });

      $("#hidden_buttonAlso").on('click',function(){
          //alert("aaa");
        $("#hidden_button").trigger('click');
    });
    $("#sub_pwd").click(function(){
        var oldPwd=$("input[name='oldPsw']").val();
        var newPwd=$("input[name='newPsw']").val();
        var confinePsw=$("input[name='confinePsw']").val();
        if(oldPwd==""){
            $("#pwd_error").html("请输入旧密码");
        }else if(newPwd==""){
            $("#pwd_error").html("请输入新密码");
        }else if(confinePsw==""){
            $("#pwd_error").html("请重复新密码");
        }else if(newPwd!=confinePsw){
            $("#pwd_error").html("两次密码输入不一致");
        }else{
            $.post("<?php echo site_url("Backend/check_old_pwd");?>",{password:oldPwd},function(data) {
                if(data=="0"){
                    $("#pwd_error").html("旧密码错误");
                }else{
                    $("#form_li").submit();
                }
            })
        }
    })

</script>
</body>
</html>
